﻿<UserControl x:Class="MayhemVisionModules.Wpf.MultiWebCamSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:visionmods="clr-namespace:MayhemVisionModules.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="800"
             SizeChanged="Selector_SizeChanged"
             Width="Auto" Height="Auto">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ItemsControl Grid.Row="0" Name="camera_selection_panel" ItemsSource="{Binding CameraPreviews}">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="{x:Type visionmods:ImageViewer}">
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.Template>
                <ControlTemplate>
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Width="Auto" Height="Auto">
                        <ItemsPresenter />
                    </ScrollViewer>
                </ControlTemplate>
            </ItemsControl.Template>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel HorizontalAlignment="Center" IsItemsHost="True"></WrapPanel>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>


    </Grid>
</UserControl>
